using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class Guide_WireMap : EntityTypeConfiguration<Guide_Wire>
    {
        public Guide_WireMap()
        {
            // Primary Key
            this.HasKey(t => t.GW_ID);

            // Properties
            this.Property(t => t.patient_id)
                .HasMaxLength(20);

            this.Property(t => t.create_by)
                .HasMaxLength(20);

            this.Property(t => t.GW_Name)
                .HasMaxLength(50);

            this.Property(t => t.GW_French)
                .HasMaxLength(50);

            this.Property(t => t.GW_Model)
                .HasMaxLength(20);

            this.Property(t => t.GW_Factory)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Guide_Wire");
            this.Property(t => t.GW_ID).HasColumnName("GW_ID");
            this.Property(t => t.TTL_ID).HasColumnName("TTL_ID");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.create_time).HasColumnName("create_time");
            this.Property(t => t.create_by).HasColumnName("create_by");
            this.Property(t => t.GW_Name).HasColumnName("GW_Name");
            this.Property(t => t.GW_French).HasColumnName("GW_French");
            this.Property(t => t.GW_Model).HasColumnName("GW_Model");
            this.Property(t => t.GW_Factory).HasColumnName("GW_Factory");
        }
    }
}
